package com.kingwang.training.ooad.coffeemaker.badway;

import com.kingwang.training.ooad.coffeemaker.hardware.api.CoffeeMakerApi;
import com.kingwang.training.ooad.coffeemaker.hardware.api.WarmerState;
import org.springframework.stereotype.Component;

/**
 * 保温盘保温元件
 *
 * @author King
 */
@Component
public class PlateHeater extends Heater {
    public PlateHeater(CoffeeMakerApi coffeeMakerApi) {
        super(coffeeMakerApi);
    }

    @Override
    public void on() {
        this.coffeeMakerApi.setWarmerState(WarmerState.ON);
    }

    @Override
    public void off() {
        this.coffeeMakerApi.setWarmerState(WarmerState.OFF);
    }
}
